import { createRouter, createWebHistory  } from 'vue-router';
import Home from './views/Home.vue';
import Login from './views/Login.vue';
import ColumnDetail from './views/ColumnDetail.vue';
import NewArticle from './views/NewArticle.vue';

const createHistory = createWebHistory()
const router = createRouter({
    history: createHistory,
    routes: [
        {
            path: '/',
            name: 'Home',
            component: Home
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/column-detail/:id',
            name: 'column-detail',
            component: ColumnDetail
        }, 
        {
            path: '/new-article',
            name: 'new-article',
            component: NewArticle
        }
    ]
})

export default router